/**
 * 
 */
package metalink.admin;

import java.util.ArrayList;

import vo.StudentFinancialsVo;

import model.admin.StudentFinanceMo;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Sony
 * 
 */
public class ViewAllTransactions extends ActionSupport {
	int year_semester_id = -1, student_id;
	ArrayList<StudentFinancialsVo> list = new ArrayList<StudentFinancialsVo>();

	public String execute() {
		setYear_semester_id(year_semester_id);
		setStudent_id(student_id);
		if (year_semester_id == -1) {
			StudentFinanceMo mo = new StudentFinanceMo();
			list = mo.getAllTransactions(student_id);
		} else {
			StudentFinanceMo mo = new StudentFinanceMo();
			list = mo.getSemTransactions(student_id,year_semester_id);
		}
		return SUCCESS;
	}

	public int getYear_semester_id() {
		return year_semester_id;
	}

	public void setYear_semester_id(int year_semester_id) {
		this.year_semester_id = year_semester_id;
	}

	public int getStudent_id() {
		return student_id;
	}

	public void setStudent_id(int student_id) {
		this.student_id = student_id;
	}

	public ArrayList<StudentFinancialsVo> getList() {
		return list;
	}

	public void setList(ArrayList<StudentFinancialsVo> list) {
		this.list = list;
	}

}
